package com.example.daily

import android.app.Application
import dagger.hilt.android.HiltAndroidApp
import kotlinx.coroutines.runBlocking
import javax.inject.Inject
import com.example.daily.data.UserPreferences

@HiltAndroidApp
class DailyApplication : Application() {
    @Inject
    lateinit var userPreferences: UserPreferences

    override fun onCreate() {
        super.onCreate()
        // 在应用启动时清除用户登录状态
        runBlocking {
            userPreferences.clearUserId()
        }
    }
} 